package com.hsmpay.mobile.dao.trans.impl;

import java.util.List;
import org.springframework.stereotype.Repository;

import com.hsmpay.common.dao.Impl.BaseDaoSupport;
import com.hsmpay.mobile.dao.trans.UserVerifycardsLogDao;
import com.hsmpay.mobile.pojo.trans.UserVerifycardsLog;
import com.hsmpay.mobile.pojo.trans.UserVerifycardsLogExample;
@Repository("userVerifycardsLogDao")
public class UserVerifycardsLogDaoImpl extends  BaseDaoSupport<UserVerifycardsLog, Long>  implements UserVerifycardsLogDao <UserVerifycardsLog, Long>{

    public UserVerifycardsLogDaoImpl() {
        super();
    }

    public void insert(UserVerifycardsLog record) {
        getSqlMapClientTemplate().insert("userVerifycardsLogSqlMap.insert", record);
    }

    public int updateByPrimaryKey(UserVerifycardsLog record) {
        int rows = getSqlMapClientTemplate().update("userVerifycardsLogSqlMap.updateByPrimaryKey", record);
        return rows;
    }

    public int updateByPrimaryKeySelective(UserVerifycardsLog record) {
        int rows = getSqlMapClientTemplate().update("userVerifycardsLogSqlMap.updateByPrimaryKeySelective", record);
        return rows;
    }

    public List selectByExample(UserVerifycardsLogExample example) {
        List list = getSqlMapClientTemplate().queryForList("userVerifycardsLogSqlMap.selectByExample", example);
        return list;
    }

    public UserVerifycardsLog selectByPrimaryKey(String orderid) {
        UserVerifycardsLog key = new UserVerifycardsLog();
        key.setOrderid(orderid);
        UserVerifycardsLog record = (UserVerifycardsLog) getSqlMapClientTemplate().queryForObject("userVerifycardsLogSqlMap.selectByPrimaryKey", key);
        return record;
    }

    public int deleteByExample(UserVerifycardsLogExample example) {
        int rows = getSqlMapClientTemplate().delete("userVerifycardsLogSqlMap.deleteByExample", example);
        return rows;
    }

    public int deleteByPrimaryKey(String orderid) {
        UserVerifycardsLog key = new UserVerifycardsLog();
        key.setOrderid(orderid);
        int rows = getSqlMapClientTemplate().delete("userVerifycardsLogSqlMap.deleteByPrimaryKey", key);
        return rows;
    }

    public int countByExample(UserVerifycardsLogExample example) {
        Integer count = (Integer)  getSqlMapClientTemplate().queryForObject("userVerifycardsLogSqlMap.countByExample", example);
        return count.intValue();
    }

    public int updateByExampleSelective(UserVerifycardsLog record, UserVerifycardsLogExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("userVerifycardsLogSqlMap.updateByExampleSelective", parms);
        return rows;
    }

    public int updateByExample(UserVerifycardsLog record, UserVerifycardsLogExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("userVerifycardsLogSqlMap.updateByExample", parms);
        return rows;
    }

    private static class UpdateByExampleParms extends UserVerifycardsLogExample {
        private Object record;

        public UpdateByExampleParms(Object record, UserVerifycardsLogExample example) {
            super(example);
            this.record = record;
        }

        public Object getRecord() {
            return record;
        }
    }
}